package cn.fintecher.pangolin.entity.elastic;

import cn.fintecher.pangolin.common.utils.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

import java.util.Date;

/**
 * @Auther: xiaqun
 * @Description: 警告实体
 * @Date: 15:13 2019/10/12
 */

@Data
@Document(indexName = Constants.WARNING, type = Constants.WARNING, shards = 1, replicas = 0)
@ApiModel(value = "警告实体", description = "警告实体")
public class Warning {
    @ApiModelProperty(value = "主键ID")
    @Id
    private String id;

    @ApiModelProperty(value = "案件编号")
    private String caseNumber;

    @ApiModelProperty(value = "批次号")
    private String batchNumber;

    @ApiModelProperty(value = "案件ID")
    private String caseId;

    @ApiModelProperty(value = "委托方ID")
    private String principalId;

    @ApiModelProperty(value = "委托方名称")
    private String principalName;

    @ApiModelProperty(value = "证件号")
    private String certificateNo;

    @ApiModelProperty(value = "警告信息")
    private String content;

    @ApiModelProperty(value = "卡号")
    private String cardNo;

    @ApiModelProperty(value = "客户姓名")
    private String personalName;

    @ApiModelProperty(value = "操作人ID")
    private String operatorId;

    @ApiModelProperty(value = "操作人姓名")
    private String operatorName;

    @ApiModelProperty(value = "操作时间")
    private Date operateTime;

    @ApiModelProperty(value = "撤销标记 0-未撤销 1-已撤销")
    private Integer flag = 0;

    public void process(String id, String name, Date date) {
        this.operatorId = id;
        this.operatorName = name;
        this.operateTime = date;
    }
}
